package com.zcb.rxjavapractice.api;

import com.zcb.rxjavapractice.Student;
import com.zcb.rxjavapractice.bean.CloudccResult;
import com.zcb.rxjavapractice.bean.GetIpInfoResponse;
import com.zcb.rxjavapractice.bean.Yy;


import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by admin on 2016/11/15.
 */

public interface ApiService {
//    static final String BASE_URL="http://192.168.1.119:8080/";
//    static final String BASE_URL="http://www.izaodao.com/Api/";

    static final String BASE_URL="http://139.196.169.68:8080/";


    @GET("service/getInfo.jsp")
    Observable<Student> getInfo(@Query("action") String ip);

    //固定查询参数
    @GET("MyRetrofit/index.jsp?action=login")
    Observable<GetIpInfoResponse> login();

    //查询所有的医院信息
    @GET("MyRetrofit/index.jsp?action=yys")
    Observable<Yy> allHospitals();

    //查询所有的视频信息
//    @POST("AppFiftyToneGraph/videoLink")
//    Call<RetrofitEntity> getAllVedio(@Body boolean once_no);


    //发送验证码
    @POST("user-web/api/sms/sendCode/v1")
    Observable<CloudccResult> sendValidNum(@QueryMap Map<String ,String> map);


    //验证验证码
    @POST("user-web/api/sms/checkCode/v1")
    Observable<CloudccResult> isValidNum(@QueryMap Map<String ,String> map);


    //登录user-web/api/user/signin/v1
    @POST("user-web/api/user/signin/v1")
    Observable<CloudccResult> loginOn(@QueryMap Map<String ,String> map);


    //查询
    @POST("user-web/api/cloudcc/forward/v1")
    Observable<CloudccResult> querycommon(@QueryMap Map<String ,String> map);

}
